Skip to content

fix(desktop): stage real sidecar binaries in _ensure-sidecar-stubs#2597

Open
sailorpepe wants to merge 1 commit into
block:mainfrom
sailorpepe:fix/desktop-sidecar-stubs-macos
Open

fix(desktop): stage real sidecar binaries in _ensure-sidecar-stubs#2597
sailorpepe wants to merge 1 commit into
block:mainfrom
sailorpepe:fix/desktop-sidecar-stubs-macos

Conversation

@sailorpepe

Copy link
Copy Markdown

What this fixes

On the documented dev flow (just setup && just build && just dev), the desktop app fails to launch its agent auth helper on macOS:

Couldn't load sign-in options: failed to run buzz-acp auth helper: Permission denied (os error 13)

This blocks Claude Code / Codex harness sign-in during onboarding (the "Set up your agent harnesses" step) and in Settings → Agents.

Root cause

_ensure-sidecar-stubs unconditionally touches 0-byte placeholder files in desktop/src-tauri/binaries/. They exist only to satisfy the tauri externalBin config at build time and are never filled. On the documented flow the real binaries are already compiled by just build (to the workspace target dir), but the stubs stay empty — so tauri dev stages a 0-byte buzz-acp next to the app binary, and the app execs an empty file → os error 13.

Fix

Copy the compiled binary into the stub when it exists (with chmod +x), matching the cp + chmod pattern that desktop-standalone and desktop-release-build already use. Fall back to touch only when the binary isn't built yet, so flows that haven't run just build keep the existing config-validation behavior.

Reproduction (macOS, aarch64)

  1. Fresh clone
  2. . ./bin/activate-hermit && just setup && just build && just dev
  3. Onboarding → "Set up your agent harnesses" → Claude Code shows "Sign-in unavailable"; Settings → Agents shows the os error 13 above.
  • Before: desktop/src-tauri/binaries/buzz-acp-aarch64-apple-darwin is 0 bytes; the real 40 MB binary is in target/debug/.
  • After: the stub is the real executable; buzz-acp --help runs; the harness loads.

Testing

Verified manually via the reproduction above. This is a build-tooling recipe and there is no automated test harness for justfile recipes in the repo — happy to add one if there's a preferred pattern.

Related

Distinct from #2492 / #2496, which fix the Windows .exe stub suffix. This is the macOS empty-fill case; the two are complementary.

@sailorpepe
sailorpepe requested a review from a team as a code owner July 23, 2026 19:29
_ensure-sidecar-stubs unconditionally `touch`es 0-byte placeholder files in
desktop/src-tauri/binaries/. On the documented dev flow
(`just setup && just build && just dev`) the real binaries are already compiled
to the workspace target dir, but the stubs are never filled — so `tauri dev`
stages a 0-byte buzz-acp next to the app binary and the desktop app fails to
launch its agent auth helper:

  Couldn't load sign-in options: failed to run buzz-acp auth helper:
  Permission denied (os error 13)

This breaks Claude Code / Codex harness sign-in on macOS out of the box.

Copy the compiled binary into the stub when it exists (chmod +x), matching the
cp + chmod pattern `desktop-standalone` / `desktop-release-build` already use.
Fall back to `touch` only when the binary is not built yet, preserving the
existing tauri-config-validation behavior for flows that have not built the
workspace.

Distinct from block#2492 / block#2496, which fix the Windows `.exe` stub suffix; this is
the macOS empty-fill case.

Signed-off-by: sailorpepe <kobumining@gmail.com>
@sailorpepe
sailorpepe force-pushed the fix/desktop-sidecar-stubs-macos branch from 62268e8 to 8925431 Compare July 23, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant